home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EGAVGA.SWG / 0054_Get the active font.pas < prev    next >
Pascal/Delphi Source File  |  1993-08-18  |  939b  |  34 lines

  1. { Get the active font table in buffer #0.
  2.   Part of the Heartware Toolkit v2.00 (HTfont.PAS) for Turbo Pascal.
  3.   Author: Jose Almeida. P.O.Box 4185. 1504 Lisboa Codex. Portugal.
  4.           I can also be reached at RIME network, site ->TIB or #5314.
  5.   Feel completely free to use this source code in any way you want, and, if
  6.   you do, please don't forget to mention my name, and, give me and Swag the
  7.   proper credits. }
  8.  
  9.  
  10. type
  11.   Font_Type  = array[1..4096] of byte;
  12.  
  13. PROCEDURE Font_Get(var Fnt : Font_Type);
  14.  
  15. { DESCRIPTION:
  16.     Get the active font table in buffer #0.
  17.   SAMPLE CALL:
  18.     Font_Get(Font_Table);
  19.   RETURNS:
  20.     The font table.
  21.   NOTES:
  22.     Works in VGA only, and with 8x16 fonts }
  23.  
  24. var
  25.   Regs : registers;
  26.  
  27. BEGIN { Font_Get }
  28.   Regs.AH := $11;
  29.   Regs.AL := $30;
  30.   Regs.BH := 6;                        { VGA: 8 x 16 }
  31.   Intr($10,Regs);
  32.   Move(Mem[Regs.ES:Regs.BP],Fnt,4096);
  33. END; { Font_Get }
  34.